package com.bwie.utils;

import io.jsonwebtoken.Jwts;

/**
 * @author :Beyond🎸🎸
 * @date : 2025-10-16 19:31:58
 * @description token获取userId
 **/
public class JwtsUtils {

    public static Integer getUserIdByToken(String token){

        Integer userId = Jwts.parser().setSigningKey("bwie").parseClaimsJws(token).getBody().get("userId", Integer.class);

        return userId;
    }
}
